﻿using UnityEngine;
/*
public static class ColliderInfoDispose
{
    public static Vector2 GetForce(this Collision2D collision)
    {
        Vector2 Force = Vector2.zero;

        foreach (ContactPoint2D point in collision.contacts)
        {
            Force += point.normal * point.normalImpulse / Time.fixedDeltaTime;
            //     impulse += point.normalImpulse;
        }

        return Force;
    }
    public static Vector2 GetNormal(this Collision2D collision)
    {
        Vector2 normal = Vector2.zero;

        foreach (ContactPoint2D point in collision.contacts)
        {
            normal += point.normal;
        }

        return normal / (1f * collision.contacts.Length);
    }
    public static Vector2 GetCotactPos(this Collision2D collision)
    {
        Vector2 pos = Vector2.zero;
        foreach (ContactPoint2D point in collision.contacts)
        {
            pos += point.point;
        }
        return pos / (1f * collision.contacts.Length);
    }
}
*/